//
//  ShopCartEditTableViewCell.h
//  EasyToTesco
//
//  Created by mc on 16/2/19.
//  Copyright © 2016年 Jack. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "SCProductInfo.h"

@protocol ShopCartEditTableViewCellDelegate <NSObject>

@optional
//删除按钮代理方法
-(void)deleteBtnClick:(UITableViewCell *)cell andbutton:(UIButton *)sender;

//增加按钮代理方法
- (void)addBtnClick:(UITableViewCell *)cell andbutton:(UIButton *)sender;

//减少按钮代理方法Reduction
- (void)reductionBtnClick:(UITableViewCell *)cell andbutton:(UIButton *)sender;

//选择按钮
- (void)editbtnClick:(UITableViewCell *)cell button:(UIButton *)sender;

@end


@interface ShopCartEditTableViewCell : UITableViewCell

//是否选中按钮
@property (weak, nonatomic) IBOutlet UIButton *shopcartseletbtn;

//商品图片
@property (weak, nonatomic) IBOutlet UIImageView *shopcartname;

//减少数量按钮
@property (weak, nonatomic) IBOutlet UIButton *reductionBtn;

//数量减少按钮事件
- (IBAction)shopcartReductionBtn:(id)sender;
//增加数量按钮
@property (weak, nonatomic) IBOutlet UIButton *addBtn;

//数量增加按钮事件
- (IBAction)shopcartaddbtn:(id)sender;
//商品数量label
@property (weak, nonatomic) IBOutlet UILabel *shopcartnum;
//商品类型和颜色label
@property (weak, nonatomic) IBOutlet UILabel *shopcartother;
//删除商品按钮事件
- (IBAction)shopcartdeletBtn:(id)sender;

- (IBAction)shopcartBtnclick:(id)sender;

//商品的选中状态
@property (nonatomic, assign)BOOL selectState;
//设置代理
@property (nonatomic, assign)id<ShopCartEditTableViewCellDelegate>delegate;

//给cell赋值
- (void)addEditCellValue:(SCProductInfo *)productInfoModel;

+ (instancetype)cellWithTableView:(UITableView *)tableView;
@end
